<link rel="stylesheet" href="<?php echo APP_TEMPLATES_URL;?>/css/public.css" />

<style>
	body,
	html {
		background: #F4F4F4 !important;
	}
	
	.indexm {
		display: none;
	}
	
	.btnccc {
		padding: 5px;
		border: 1px solid #ddd !important;
		float: right;
		min-width: 60px;
		text-align: center;
		margin-left: 10px;
		font-size: 12px;
	}
	
	.btnorg {
		padding: 5px;
		border: 1px solid #efb33e !important;
		color: #efb33e;
		min-width: 60px;
		float: right;
		margin-left: 10px;
		text-align: center;
		font-size: 12px;
	}
	
	.fenleigoods {
		float: left;
		width: 100%;
		border-bottom: 1px solid #EEEEEE;
		background: #FFFFFF;
	}
	
	.fenleigoods li:nth-child(odd) {
		border-right: 1px solid #EEEEEE;
	}
	
	.fenleigoods li {
		float: left;
		width: 50%;
		text-align: center;
		line-height: 25px;
		padding-bottom: 20px;
		border-top: 1px solid #EEEEEE;
	}
	.youhui label{font-size: 14px;line-height: 30px;}
</style>
<!-- 导航 -->
<div class="mui-bar mui-bar-nav bj">
	<button class="mui-btn mui-btn-link mui-btn-nav mui-pull-left zys  mui-action-back" onclick="history.go(-1);">
				<img style=" max-width: 50%; vertical-align: middle;" src="<?php echo APP_TEMPLATES_URL;?>/images/back.png" />
			</button>
	<h1 class="mui-title"><label style="font-size: 22px;vertical-align: middle;">退款详情</label></h1>
</div>

<div style="background: #FFFFFF;">
  <?php $state = $output['refund']['refund_state'];?>
    <?php switch($state){
       case '1':?>
	<img style="width: 100%;" src="<?php echo APP_TEMPLATES_URL;?>/images/100.jpg">
	<?php break;?>
	<?php case '2':?>
	<img style="width: 100%;" src="<?php echo APP_TEMPLATES_URL;?>/images/1299.jpg">
	<?php break;?>
	<?php case '3':?>
	<img style="width: 100%;" src="<?php echo APP_TEMPLATES_URL;?>/images/12999.jpg">
	<?php break;?>
	<?php }?>
	
		<div style="padding-left: 20px;">
				<div style="width: 100%;border-bottom: 1px solid #EEEEEE; margin-bottom: 15px;float: right;"></div>
		</div>

	<table width="100%" style="background: #FFFFFF;">
		
		<!-- tr>
			<td style="vertical-align: middle;width: 20px;text-align: center;" rowspan="3"></td>
			<td colspan="2" height="25">
				
				<label style="vertical-align: middle; margin-right: 0px;">退货时间：</label>
				<label style="vertical-align: middle;color: #999;">剩余06天23时逾期未退货申请将自动关闭</label>
			</td>
			<td rowspan="2" style="vertical-align: middle;width: 10px;text-align: center;"></td>
		</tr>
		<tr>
			<td>
				<label style="vertical-align: middle; margin-right: 0px;">退货地址：</label>
				<label style="color: #999;padding-bottom: 6px; ;">测试地址测试地址测试地址测试地址测试地址测试地址18号</label>
			</td>
		</tr-->
		<tr>
			<td rowspan="2" style="height: 5px;">
				<div style="margin: 20px 0;float: left;">
					<?php if($output['refund']['seller_state']==2){?><a class="loginbnt" style="width: 135px;margin-right: 20px;font-size: 16px;line-height: 40px;display:none;" href="index.php?act=temp&op=refund_logistics">填写退货物流</a>
					<a class="loginbnt" style="margin-left: 20px;width: 135px;font-size: 16px;line-height: 39px; border: 1px solid #f0b33e !important; background: #FFFFFF" href="javascript:cancelRefund('<?php echo $output['refund']['refund_id'];?>')">取消退款</a><?php }?>
				</div>
			</td>
		</tr>
	</table>
	
	<div style="width: 100%; height: 10px; background: #F4F4F4;"></div>
	<div style="background: #FFFFFF;">
		<p style="padding:10px 20px;border-bottom: 1px solid #F4F4F4; font-size: 14px;">订单编号：<?php echo $output['order_info']['order_sn'];?></p>
	</div>

	<div class="youhui" style="padding:10px 20px; background: #FFFFFF;">
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 75px;"><label style="color: #000;">退款申请</label></td>
				<td style="text-align: left;"></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">退款编号：</label></td>
				<td style="text-align: left;"><label style="color: #999;"><?php echo $output['refund']['refund_sn']; ?></label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">退款原因：</label></td>
				<td style="text-align: left;"><label style="color: #999;"><?php echo $output['refund']['reason_info']; ?></label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">退款金额：</label></td>
				<td style="text-align: left;"><label style="color: #999;"><?php echo $lang['currency'];?><?php echo $output['refund']['refund_amount']; ?></label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">退款说明：</label></td>
				<td style="text-align: left;"><label style="color: #999;"><?php echo $output['refund']['buyer_message']; ?></label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">凭证上传：</label></td>
				<td style="text-align: left; vertical-align: top;"><label style="color: #999;">
					<dd>
            <?php if (is_array($output['pic_list']) && !empty($output['pic_list'])) { ?>
            <ul class="ncm-evidence-pic">
              <?php foreach ($output['pic_list'] as $key => $val) { ?>
              <?php if(!empty($val)){ ?>
              <li><a href="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_PATH.'/refund/'.$val;?>" nctype="nyroModal" rel="gal"> <img class="show_image" src="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_PATH.'/refund/'.$val;?>"></a></li>
              <?php } ?>
              <?php } ?>
            </ul>
            <?php } ?>
          </dd>
				</label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 105px;"><label style="color: #000;">商家退款处理</label></td>
				<td style="text-align: left;"></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">审核状态:</label></td>
				<?php $stateArr = array('1'=>'审核中','2'=>'卖家同意退款','3'=>'卖家拒绝');?>
				<td style="text-align: left;"><label style="color: #999;"><?php echo $stateArr[$output['refund']['seller_state']]; ?></label></td>
			</tr>
		</table>
	</div>
	<div class="youhui" style="padding:10px 20px; background: #FFFFFF;display:none;">
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #000;">关联商品</label></td>
				<td style="text-align: left;"></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">商品名称：</label></td>
				<td style="text-align: left;"><label style="color: #999;">1888.88</label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">商品金额：</label></td>
				<td style="text-align: left;"><label style="color: #999;">1888.88</label></td>
			</tr>
		</table>
		<table width="100%">
			<tr>
				<td style="text-align: left;width: 95px;padding-left: 15px;"><label style="color: #999;">订单编号：</label></td>
				<td style="text-align: left;"><label style="color: #999;">000000000</label></td>
			</tr>
		</table>
	</div>
	<div style="width: 100%; height: 10px; background: #F4F4F4;"></div>
	
</div>
<script language="Javascript">
    function cancelRefund(id){
      if(confirm('确认要取消退款要求吗?')){
          window.location.href = 'index.php?act=order&op=cancel_refund&refund_id='+id;
      }
    }
</script>
